package com.fattyCorps.common.obj.config;

import com.fattyCorps.common.enums.battle.ECamp;
import com.fattyCorps.common.enums.battle.ECareer;
import com.fattyCorps.common.util.GameCfgUtils;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class HeroMould extends BaseCfg {
    private String animPath;
    private Integer height;
    private String name;
    // 阵营
    private ECamp camp;
    // 职业
    private ECareer career;

    private Integer initAtt = 0;
    private Integer initDef = 0;
    private Integer initMaxHp = 0;
    private Integer initSpeed = 0; // 速度
    private Integer initSkillDamagePer = 0; // 技能伤害
    private Integer initPrecisePer = 0; // 精准
    private Integer initParryPer = 0; // 格挡
    private Integer initCriticalPer = 0; // 暴击
    private Integer initCriticalDamagePer = 0; // 暴击伤害
    private Integer initArmorBreakPer = 0; // 破甲
    private Integer initImmunityControlPer = 0; // 免控率
    private Integer initReduceDamagePer = 0; // 减伤率
    private Integer initSacredDamagePer = 0; // 神圣伤害
    private Integer initReduceCriticalPer = 0; // 暴击抵抗
    private Integer initIncDamagePer = 0; // 增伤率
    private Integer initIncControlPer = 0; // 增控率

    private Integer lvUpAtt = 0; // 每级增加攻击
    private Integer lvUpDef = 0; // 每级增加防御
    private Integer lvUpMaxHp = 0; // 每级增加血量

    private Integer initStar = 1;   // 初始星级
    private Integer maxStar = 1;    // 最大星级

    private String skillGroupIds; // 技能组列表
    private Integer lotteryWeight = 0; // 抽卡权重

//    @TableField(exist = false)
    private List<Integer> skillGroupIdsList = new ArrayList<>();

    public void setSkillGroupIds(String str) {
        skillGroupIds = str;
        skillGroupIdsList.addAll(GameCfgUtils.splitIdListStr(str));
    }
}
